//
//  CheckWorkTableViewCell.m
//  rrqs
//
//  Created by 朱耀春 on 2019/5/1.
//

#import "CheckWorkTableViewCell.h"

@implementation CheckWorkTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [_progressView.layer setCornerRadius:5];
    [_progressView.layer setMasksToBounds:YES];
    //设置它的轨道颜色
    _progressView.trackTintColor = kWhiteColor;
    //设置进度的颜色
    _progressView.progressTintColor = kgreen_color;
    for (UIImageView * imageview in self.progressView.subviews) {
        imageview.layer.cornerRadius = 5;
        imageview.clipsToBounds = YES;
    }
    
}

-(void)setModel:(CheckWorkModel *)model{
    _timeL.text = model.datatime;
    _staut.text = model.hour;
//    CGFloat progress =  [model.datatimeall integerValue] / 100.00;
    CGFloat progress =  [model.datatimeall floatValue] ;

    [UIView animateWithDuration:0.3 animations:^{
        self.progressView.progress = 0;
    } completion:^(BOOL finished) {
        [self.progressView setProgress:progress  animated:YES];
    }];
    NSLog(@">>>> %lf",[model.datatimeall floatValue]);
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)rightBut:(UIButton *)sender {
}
@end
